package week12.mq;

import org.apache.activemq.broker.BrokerService;

/**
 * @author lfy
 */
public class TestActiveMq {
    public static void main(String[] args) throws Exception {
        // 创建 broker 服务器
        BrokerService brokerService = new BrokerService();
        // 设置使用 Jmx
        brokerService.setUseJmx(true);

//         <transportConnector name="openwire" uri="tcp://0.0.0.0:61616?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
//         <transportConnector name="amqp" uri="amqp://0.0.0.0:5672?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
//         <transportConnector name="stomp" uri="stomp://0.0.0.0:61613?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
//         <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1883?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
//         <transportConnector name="ws" uri="ws://0.0.0.0:61614?maximumConnections=1000&amp;wireFormat.maxFrameSize=104857600"/>
        // 绑定服务地址
        brokerService.addConnector("tcp://0.0.0.0:61616");
       // brokerService.addConnector("amqp://0.0.0.0:5672");
        // 启动服务器
        brokerService.start();
    }
}
